<!-- 500,504页面 -->
<template>
  <view class="page-not-found">
    <view class="logo"><image :src="getLogo" style="width:100%" mode="widthFix"></image></view>
    <view class="error-message">
      <view class="ngcontent-c1">结账人数过多，请稍后再试 ...</view>
      <button class="nickName" @tap="goCart">重新结算</button>
    </view>
  </view>
</template>

<script>
import { SEL_CLASS_CODE, SEL_ACTIVE_CODE, SYSTEM_INFO, USER_INFO, CUSTOMER_INFO, CUSTOMER_HOTFIX, CART_KEY, MERCHANT_INFO } from '@/utils/constant';
export default {
  data() {
    return {
      windowHeight: 0
    };
  },
  onLoad() {
    let that = this;
    let systemInfo = uni.getStorageSync(SYSTEM_INFO);
    that.windowHeight = systemInfo.windowHeight;
    let pages = getCurrentPages();
    var currPage = pages[pages.length - 1]; //当前页面
    this.nowPages = currPage.route;
  },
  onShow() {
   getApp().cl_tracker.track('mini_program_view', {
         path:  this.nowPages,
         pageName: '结账人数过多，请稍后再试 ...',
       }) 
  },
  computed: {
    getLogo() {
      return this.$store.state.storeLogo;
    }
  },
  methods: {
    _backhome() {
      uni.redirectTo({
        url: '/pages/home/home'
      });
    },
    goCart: function(e) {
      // uni.switchTab({
      uni.relaunch({
      	url: '/pages/cart/cart'
      });
    }
  }
};
</script>

<style>
.page-not-found {
  color: #444;
  width: 100%;
  height: 100%;
}
.page-not-found .logo {
  width: 160rpx;
  margin: 0 auto;
  padding-top: 200rpx;
}
.error-message {
  font-size: 30rpx;
  margin-top: 80rpx;
  text-align: center;
  padding: 0 40rpx;
}
.ngcontent-c1 {
  margin: 0 0 80rpx;
  font-size: 40rpx;
  color: #444;
}
.nickName {
  font-size: 30rpx;
  color: #fff;
  text-align: center;
  display: block;
  margin: 20rpx auto 0;
  width: 260rpx;
  background-color: #000000;
  opacity: 0.8;
  border-radius: 0;
}
</style>
